const http = require('../utils/http')

const HTTP = new http.HTTP()


// 发送短信验证码
export function sendSms(tel, callback) {
  let params = {
    tel
  }
  console.log(params)
  HTTP.request('/code/sendsms', 'POST', params, res => {
    callback(res)
  })
}

// 短信校验
export function checkSms(tel, smscode, callback) {
  let params = {
    tel,
    smscode
  }
  HTTP.request('/code/checksms', 'POST', params, res => {
    console.log(res)
    callback(res)
  })
}

// 个人注册
export function registerNow(params, callback) {
  console.log(params)
  HTTP.request('/volunteer/register', 'POST', params, res => {
    callback(res)
  })
}
// 成员
export function registerOther(params, callback) {
  console.log(params)
  HTTP.request('/volunteer/register', 'POST', params, res => {
    callback(res)
  })
}
